# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=hurl-encoder
pkgver=20.afca9c5
pkgrel=6
pkgdesc='Hexadecimal & URL (en/de)coder.'
arch=('any')
groups=('blackarch' 'blackarch-misc')
url='https://github.com/fnord0/hURL'
license=('custom:unknown')
depends=('perl' 'perl-cgi' 'perl-uri' 'perl-digest-sha1' 'perl-mime-types')
makedepends=('git')
source=("$pkgname::git+https://github.com/fnord0/hURL.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 755 hURL "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README
}

